package com.ruoyi.common.core.annotation;



import com.ruoyi.common.core.annotation.impl.NonNullVerificationValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author zgx
 * @Title:
 * @Package
 * @Description:
 * @date 2022/5/6 15:29
 */
@Documented
@Constraint(validatedBy = {NonNullVerificationValidator.class})
@Target(ElementType.FIELD)
@Retention(RUNTIME)
public @interface NonNullVerification {

    String message() default "字段为空";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    /**
     * @return the regular expression to match
     */
    String regexp();
}
